package com.bdqn.t296.noso.service.Imp;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.bdqn.t296.noso.entity.CCashier;
import com.bdqn.t296.noso.entity.Coutpatienttype;
import com.bdqn.t296.noso.entity.ReportVo;
import com.bdqn.t296.noso.mapper.PricingMapper;
import com.bdqn.t296.noso.service.PricingService;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;

@Service
public class PricingServiceImp implements PricingService {
    @Resource
    PricingMapper pricingMapper;

    //查询门诊收费项目
    @Override
    public IPage<Coutpatienttype> selout(Page<Coutpatienttype> page, Coutpatienttype coutpatienttype) {
        return pricingMapper.selout(page, coutpatienttype);
    }

    //查询这个用户的处方表上有没有这个药
    @Override
    public Integer selchuo(CCashier cCashier) {
        return pricingMapper.selchuo(cCashier);
    }

    //添加处方项目
    @Override
    public Integer addchuo(CCashier cCashier) {
        return pricingMapper.addchuo(cCashier);
    }

    //如果有该项目则改变该项目的数量
    @Override
    public Integer updchuo(CCashier cCashier) {
        return pricingMapper.updchuo(cCashier);
    }

    //删除处方中的项目
    @Override
    public Integer delo(CCashier cCashier) {
        return pricingMapper.delo(cCashier);
    }

    //查询这个用户的处方的价钱
    @Override
    public Double selch(CCashier cCashier) {
        return pricingMapper.selch(cCashier);
    }

    //修改用户信息付过钱了
    @Override
    public Integer shoufei(ReportVo reportVo) {
        return pricingMapper.shoufei(reportVo);
    }

    //把挂号费添加到收费表上
    @Override
    public Integer guafei(ReportVo reportVo) {
        return pricingMapper.guafei(reportVo);
    }
}
